import React, { Component } from 'react';
import { View, StyleSheet, Image, Text, TouchableWithoutFeedback,Alert  } from 'react-native';

export default class Sitem extends Component {
    showService(name,e) {
        Alert.alert('服务',`${name}#开发中...`);
    }

    render() {
        const { name, icon} = this.props;
        const source = require("../static/WechatIMG193.png");
        return (
            <TouchableWithoutFeedback onPress={this.showService.bind(this,name)}>
                <View style={styles.item}>
                    <Image source={source} style={styles.image} />
                    <Text style={styles.text}>{name}</Text>
                </View>
            </TouchableWithoutFeedback>
        );
    }
}

const styles = StyleSheet.create({
    item: {
        textAlign: 'center', 
        marginBottom: 10,
        marginTop: 10
    },
    image: {
        width: 60,
        height: 60,
        borderRadius: 30,
        marginBottom: 10,
    },
    text: {
        fontSize: 13,
        color: '#666'
    }
})